package com.m.demo.controller;

import com.m.demo.aspect.MyAspect;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    @RequestMapping("/hello")
    public String hello() {
        return "hello";
    }

//    @RequestMapping("/t1")
//    public String t1() {
//        int a = 10 / 0;
//        return "t1";
//    }

    @MyAspect
    @RequestMapping("/h1")
    public String h1() {
        return "h1";
    }

    @RequestMapping("/h2")
    public String h2() {
        return "h2";
    }
}
